﻿using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;

namespace netduinoTest
{
    public class Program
    {
        /// <summary>
        /// This super simple app just blinks the LED when you press the onboard switch.  
        /// Taken from http://netduino.com/projects/
        /// </summary>
        public static void Main()
        {
            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
            InputPort button = new InputPort(Pins.ONBOARD_SW1, false, Port.ResistorMode.Disabled);
            bool buttonState = false;

            while (true)
            {
                buttonState = button.Read();
                led.Write(!buttonState);    
            }

        }

    }
}
